<?php
/**
 * More & Original PHP Framwork
 * Copyright (c) 2009 - 2010 IsMole Inc.
 * document Excel 工具
 * $Id: Excel_read.php $
 */
class Control_ExcelConfMaker_Excel_preview {
	/**
	 * 
	 * 预览Excel文件
	 * 
	 */
	public function preview($fileName, $title = "预览excel") {
		$objPHPExcel = PHPExcel_IOFactory::load($fileName);
		// 设置标题
		$objPHPExcel->getProperties()->setTitle($title);
		$objWriteHTML = new PHPExcel_Writer_HTML($objPHPExcel);
		$objWriter = new PHPExcel_Writer_Excel5($objPHPExcel);
		
		$objWriteHTML->save('php://output');
		exit;
	}
}